﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="QuanCafe.Admin.AdminLogin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Trang dang nhap quan tri QuanCafe</title>
    <script type="text/javascript" src="/js/jquery.js"></script>
    <style type="text/css">
        .admin_login_container
        {
	        width: 100%; 
	        height: auto;
        }
        .admin_login_container div.admin_login_panel
        {
	        width: 600px; 
	        height: 400px; 
	        margin: 120px auto; 
	        background-color: #FFFFFF;
	        font-family: Segoe UI; 
	        font-size: 21px;
        }
        .admin_login_container div.admin_login_panel div
        {
        	/*border: 1px solid #000000;*/
        }
        .admin_login_container div.admin_login_panel input.textbox
        {
	        font-family: Segoe UI; 
	        font-size: 18px;
	        width: 100%;
        }
        .admin_login_container div.admin_login_panel span
        {
        	margin: 0 25px 0 35px;
        }
        .error_pnl
        {
        	width: 400px;
        	margin: 10px auto;
        	border: 1px solid #C00;
        	background-color: #FFEBE8;
        	padding: 4px 0 4px 0;
        }
        .error_pnl span
        {
        	font-family: Tahoma;
        	font-size: 15px; font-weight: bold;
        	text-decoration: underline;
        	color: Red;
        }
        .button_login
        {
        	background: transparent url('../images/icons/Next-icon.png') no-repeat top left;
        	width: 46px; height: 46px;
        	border:0px none;
        	cursor: pointer;
        }
    </style>
</head>
<body style="background-color: #000000;">
    <form id="form1" runat="server">
    <div class="admin_login_container">
        <div class="admin_login_panel">
            <div style="width: 100%; float: left; padding: 25px;">
                <h3>QuánCafe.vn</h3>
            </div>
            <div style="width: 100%; float: left; padding: 15px;" id="username_pnl">
                <div style="float: left; width: 220px;">
                    <asp:Label ID="lblUsername" runat="server" Text="Tên đăng nhập"></asp:Label>
                </div>
                <div style="float: left; width: 270px;">
                    <asp:TextBox ID="txtUsername" runat="server" CssClass="textbox"></asp:TextBox>
                </div>
            </div>
            <div style="width: 100%; float: left; padding: 15px;" id="password_pnl">
                <div style="float: left; width: 220px;">
                    <asp:Label ID="Label1" runat="server" Text="Mật khẩu"></asp:Label>
                </div>
                <div style="float: left; width: 270px;">
                    <asp:TextBox ID="txtPassword" TextMode="Password" runat="server" CssClass="textbox"></asp:TextBox>
                </div>
            </div>
            <div style="width: 80%; float: left;">
                <div style="float: right;"><asp:Button ID="btnLogin" runat="server" Text="" CssClass="button_login" OnClick="btnLogin_Click" /></div>
            </div>
            <div style="width: 100%; float: left; margin-top: 5px;">
                <div class="error_pnl">
                    <asp:Label ID="lblErr" runat="server" Text="Vui lòng nhập đầy đủ thông tin."></asp:Label>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" language="javascript">
        $(document).ready(function() { 
            <% if(!Page.IsPostBack) { %> $(".error_pnl").hide(); <%} %>
            $("#txtUsername").focus();
        });
        function CheckForm(){
            $(".error_pnl").hide();
            if($.trim($("#txtUsername").val()) == "")
            {
                $("#txtUsername").focus();
                //$(".error_pnl").fadeIn("fast");
                $(".error_pnl").show();
                $("#lblErr").html("Vui lòng nhập tên đăng nhập.");
                return false;
            }
            else
            {
                if($.trim( $("#txtPassword").val() ) == "")
                {
                    $("#txtPassword").focus();
                    //$(".error_pnl").fadeIn("fast");
                    $(".error_pnl").show();
                    $("#lblErr").html("Vui lòng nhập mật khẩu.");
                    return false;
                }
                else return true;
            }
        }
    </script>
    </form>
</body>
</html>
